Skip to content

Adds parsing / validation of JSON configuration, for I19 transmission hardware. - #2173

Open
CoePaul wants to merge 2 commits into
mainfrom
issue2172
Open

Adds parsing / validation of JSON configuration, for I19 transmission hardware.#2173
CoePaul wants to merge 2 commits into
mainfrom
issue2172

Conversation

@CoePaul

@CoePaul CoePaul commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Contributes to #2172

Instructions to reviewer on how to test:

  1. Check BaseModel classes against JSON in file mentioned from i19 config in Pydantic BaseModels to capture I19 transmission system JSON specifications #2172 description
  2. Check tests cover reasonable expectations for JSON validation
  3. Ensure CI passes the tests and that the python matches house style ( etc )

N.B. Voids in an i19 absorber wedge are bubbles in the absorber material ( 3-D printer output )
and therefore motor positions to avoid:
Nothing to do with the software void type.

Checks for reviewer

  • Would the PR title make sense to a scientist on a set of release notes
  • If a new device has been added does it follow the standards
  • If changing the API for a pre-existing device, ensure that any beamlines using this device have updated their Bluesky plans accordingly
  • Have the connection tests for the relevant beamline(s) been run via dodal connect ${BEAMLINE}

@CoePaul
CoePaul requested a review from a team as a code owner August 13, 2026 15:10
@CoePaul CoePaul added the i19-2 label Aug 13, 2026
@CoePaul CoePaul self-assigned this Aug 13, 2026
@CoePaul
CoePaul marked this pull request as draft August 13, 2026 15:11
@CoePaul CoePaul added i19-1 python Pull requests that update Python code labels Aug 13, 2026
@codecov

codecov Bot commented Aug 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.21%. Comparing base (3922223) to head (9da488d).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2173      +/-   ##
==========================================
+ Coverage   99.19%   99.21%   +0.01%     
==========================================
  Files         367      378      +11     
  Lines       14596    14845     +249     
==========================================
+ Hits        14479    14728     +249     
  Misses        117      117              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@CoePaul
CoePaul force-pushed the issue2172 branch 4 times, most recently from 4cf081e to 13c130e Compare August 19, 2026 20:26
* Start with adding JSON validation for system specification
  JSON dict-like structure expectations

* Pydantic BaseModel classes map sub-structures ( sub-dicts ) within
  the system description structure here adding
   JSON validation for energy_interval
   [ the range of x-ray energies (in keV ) over which an absorption curve is valid ]
   JSON validation for absorption fit curve parameters
   [ the scaling constant, roll-off vs energy and an optional residuals polynomial ]
@CoePaul CoePaul changed the title Issue2172 Adds parsing / validation of JSON configuration, for I19 transmission hardware. Aug 27, 2026
@CoePaul
CoePaul marked this pull request as ready for review August 27, 2026 15:17
@CoePaul
CoePaul force-pushed the issue2172 branch 3 times, most recently from 4896111 to 736f148 Compare August 27, 2026 23:32
* Use pydantic BaseModel classes to capture blobs from Transmission System
  specification config JSON files for I19 beamlines EH-1 / EH-2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

i19-1 i19-2 python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant